package com.example.vo;

import java.util.List;

public class PageBean1 {
	 private Integer pagesize; //每页条数
	  private Integer pagenum;//当前页数
	  private Integer rowcount;//总行数
	  private  Object pagedata;//存放的数据
	  private Integer nextpage;//下一页
	  private Integer previouspage;//上一页
	  private Integer maxpage;//总页数
	  public Integer getPagesize() {
			return pagesize;
		}
		public void setPagesize(Integer pagesize) {
			this.pagesize = pagesize;
		}
		public Integer getPagenum() {
			return pagenum;
		}
		public void setPagenum(Integer pagenum) {
			this.pagenum = pagenum;
		}
		public Integer getRowcount() {
			return rowcount;
		}
		public void setRowcount(Integer rowcount) {
			this.rowcount = rowcount;
		}
		
	
		public Object getPagedata() {
			return pagedata;
		}
		public void setPagedata(Object pagedata) {
			this.pagedata = pagedata;
		}
		public Integer getNextpage() {
			return (this.pagenum+1)>getMaxpage()?getMaxpage():this.pagenum+1;
		}
		public void setNextpage(Integer nextpage) {
			this.nextpage = nextpage;
		}
		public Integer getPreviouspage() {
			return (this.pagenum-1)<1?1:this.pagenum-1;
		}
		public void setPreviouspage(Integer previouspage) {
			this.previouspage = previouspage;
		}
		public Integer getMaxpage() {
			return (int)Math.ceil((double)rowcount/pagesize);
		}
		public void setMaxpage(Integer maxpage) {
			this.maxpage = maxpage;
		}
		public PageBean1(Integer pagesize, Integer pagenum, Integer rowcount,
				Object pagedata, Integer nextpage, Integer previouspage,
				Integer maxpage) {
			super();
			this.pagesize = pagesize;
			this.pagenum = pagenum;
			this.rowcount = rowcount;
			this.pagedata = pagedata;
			this.nextpage = nextpage;
			this.previouspage = previouspage;
			this.maxpage = maxpage;
		}
		public PageBean1() {
			super();
		}
		@Override
		public String toString() {
			return "PageBean [pagesize=" + pagesize + ", pagenum=" + pagenum
					+ ", rowcount=" + rowcount + ", pagedata=" + pagedata
					+ ", nextpage=" + nextpage + ", previouspage=" + previouspage
					+ ", maxpage=" + maxpage + "]";
		}
		    
	  
}
